#pragma once

#include "EXStaticResSet.h"
// CEXStatic

class AFX_EXT_CLASS CEXStatic : public CStatic
{
	DECLARE_DYNAMIC(CEXStatic)

public:
  enum STATIC_STYLE
  {
    NOIMAGE,
    STATIC = 13,
  };

	CEXStatic(UINT nID = 0, COLORREF crBkgnd = RGB(0,0,0));
	virtual ~CEXStatic();

	void SetBkgndBitmap(UINT nID);
	void SetBkgndColor(COLORREF crBkgnd);

	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	void SetMargin(int nMargin = 2);

	COLORREF m_crBkgnd;
	CBitmap m_bmpBkgnd;
	BITMAP m_bmBkgnd;
	DWORD m_dwStyle;

	int m_LeftWidth;
	int m_TopHeight;
	int m_RightWidth;
	int m_BottomHeight;

	int m_nMargin;
	CBrush m_brush;

  //ysy
  void SetResSet(CEXBaseResSet* pResSet);
  CEXStaticResSet* m_pStaticResSet;
  COLORREF m_crFont;
  
protected:
	DECLARE_MESSAGE_MAP()
	virtual void PreSubclassWindow();
public:
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnSize(UINT nType, int cx, int cy);
};


